package com.demo.service.impl;

import org.springframework.stereotype.Service;

import com.demo.myexception.AopException;
import com.demo.service.AopService;

@Service
public class AopServiceImpl implements AopService {

	@Override
	public Boolean test(int id) throws AopException {
		if (id == 1) {
			return true;
		} else {
			throw new AopException("测试成功！");
		}
	}

}
